cmake_minimum_required(VERSION 3.10)
project(DiskSimulatorDemo)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)

include_directories(include)

add_library(disk_simulator SHARED src/disk_simulator.cpp)
set_target_properties(disk_simulator PROPERTIES OUTPUT_NAME "disk_simulator")

# 强制生成 .so 后缀
set_target_properties(disk_simulator PROPERTIES SUFFIX ".so")

target_include_directories(disk_simulator PUBLIC include)

add_executable(demo demo/demo.cpp)
target_link_libraries(demo dl) 